<?php

namespace api\modules\v1\models;

use Yii;
use api\modules\v1\models\User as U;
use yii\helpers\ArrayHelper;
class Simuser extends U
{

    public function rules()
    {
       return ArrayHelper::merge(parent::rules(), [
           [['password'], 'required','message'=>'{attribute}不能为空', 'on' => ['lr_pwd']],
           [['password'], 'filter', 'filter' => 'trim', 'on' => ['lr_pwd']],
           [['password'], 'string', 'min' => 6,  'max' => 20,'message'=>'必须为6-20位', 'on' => ['lr_pwd']],

           [['code'], 'required','message'=>'{attribute}不能为空', 'on' => ['lr_pwd']],
           [['code'], 'filter', 'filter' => 'trim', 'on' => ['lr_pwd']],
           [['code'], 'validateCode', 'on' => ['lr_pwd']],
        ]);
    }



}
